package com.lianyu507;

import com.lianyu507.listener.CreateUserListener;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Hello world!
 */
@Configuration
@EnableAutoConfiguration
@ComponentScan
@MapperScan("com.lianyu507.mapper")
public class App {

    protected final static Logger logger = LoggerFactory.getLogger(App.class);


    public static void main( String[] args )
    {
        logger.debug("start with debug");
        SpringApplication app = new SpringApplication(App.class);
        //添加容器监听
        app.addListeners(new CreateUserListener());
        app.run(args);
    }
}
